<template>
  <div class="wrapper" v-if="setShow">
    <div class="con">
      <div
        class="eachItem"
        v-for="item in $store.state.dataList.data.recommend_list"
        :key="item.item.id"
      >
        <img :src="item.item.pic_list[0]" alt />
        <!-- <i v-if="item.item.tag_list[0].tag">{{item.item.tag_list[0].tag}}</i> -->
        <p>{{item.item.name.slice(0,29)}}...</p>
        <div>
          <img :src="item.item.icon" alt />
          <span>{{item.item.nickname}}</span>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  computed: {
    setShow() {
      if (this.$store.state.dataList.result === "ok") {
        return true;
      }
      return false;
    }
  }
};
</script>

<style lang="scss" scoped>
.wrapper {
  width: 100%;
  .con {
    width: 100%;
    column-count: 2;
    column-gap: 10px;
    .eachItem {
      width: 100%;
      background: white;
      border-radius: 5px;
      margin-bottom: 10px;
      overflow: hidden;
      img {
        width: 100%;
      }
      p{
          color: #333;
          font-size: 14px;
          margin-top: 10px;
      }
      div {
          display: flex;
          align-items: center;
          margin: 10px 0 20px 0;
          font-size: 12px;
        img {
          width: 24px;
          border-radius: 50%;
          margin-right: 10px;
        }
      }
    }
  }
}
</style>